-
Notifications
You must be signed in to change notification settings - Fork 132
RunConfig
as architectural boundary proposal
#2096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2096 +/- ##
==========================================
+ Coverage 53.43% 53.45% +0.01%
==========================================
Files 230 230
Lines 29385 29385
==========================================
+ Hits 15703 15707 +4
+ Misses 12552 12549 -3
+ Partials 1130 1129 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b7dca4b
to
fb9c334
Compare
@claude please review this architectural proposal |
Claude finished @JAORMX's task —— View job Architectural Proposal ReviewI've reviewed the Overall AssessmentThis is a well-structured and necessary proposal that addresses real architectural concerns in ToolHive. The separation of concerns between Strengths
Areas for Improvement1. Implementation Guidance MissingThe proposal describes what should change but lacks how to achieve it. Consider adding:
2. Concrete Examples of ViolationsThe proposal would benefit from specific examples of current violations: Current problematic fields in
These should be called out explicitly as fields that violate the proposed boundary. 3. Validation Responsibility UnclearLine 75 mentions "basic validation" as a Suggested clarification:
4. Serialization Format Not SpecifiedLine 75 mentions serialization but doesn't specify:
5. Missing Discussion of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An open question I'd like to discuss tomorrow is: Should we have information about the secret provider that's used and a key to retrieve the secret at runtime? This would make it easier to share configurations.
@@ -0,0 +1,81 @@ | |||
# `RunConfig` as Architectural Boundary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General comment worth noting: There are a bunch of fields in the run config right now which are only needed for backwards compatibility. We should clean those up as part of stabilization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: we have a VersionSchema
field in the RunConfig
struct, we should leverage that.
Action Item: list fields that are either no longer used or not desired anymore.
@JAORMX currently, |
* permission profile (literal or file-based) | ||
* OIDC configuration parameters | ||
* authorization config (literal or file-based) | ||
* audit config (literal or file-based) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of these are deprecated.
|
||
We propose the following split in responsibilities | ||
|
||
**RunConfig** data structure and routines will be responsible for holding configuration parameters, basic validation, and serialization, but not storage. Simply put, the package should accept bytes and readers, and return bytes, similarly to how `encoding/json` works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: currently, validation for middleware configs is done late in the process and should be done at least where it's currently done as well as when instantiating a RunConfig
.
Action Item: document here where validation is implemented and where validation routines should be invoked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a section at the bottom of the file.
4bcc943
to
bcd010d
Compare
This change contains a design doc describing an architectural boundary at `RunConfig` level. Aim of this design doc is * listing the current responsibilities of `RunConfig` and related code (e.g. `Runner`) * propose a new split of responsibilities and a clear golang API for it * clarify what responsibilities should be moved in the respective user interfaces, e.g. CLI or Operator
bcd010d
to
6beef0c
Compare
This change contains a design doc describing an architectural boundary at
RunConfig
level. Aim of this design doc isRunConfig
and related code (e.g.Runner
)